Skip to main content

Encrypt File

AutomatR.DefaultActivities.Cryptography.EncryptFile

The "Encrypt File" activity in AutomatR is part of the Cryptography activities package, enabling automation processes to encrypt files using various encryption algorithms. This activity provides a secure way to protect sensitive information within files.

NameDescription
Input
AlgorithmSpecifies the cryptographic algorithm to be used for encryption. Options include AES (Advanced Encryption Standard), DES (Data Encryption Standard), Triple DES, AESGCM (AES Galois/Counter Mode), RC2, and Rijndael. Supports a CryptographyAlgorithm enumeration variable.
File PathSpecifies the path of the file that you want to encrypt. Supports a string variable.
KeySpecifies the encryption key to be used. The key should be kept confidential and used for decryption later. Supports a SecureString variable.
Misc
Display NameThis property allows you to customize the display name of the activity within the workflow.
Optional
DelaySpecifies a delay (in seconds) before executing the activity, providing flexibility in the timing of the workflow. Supports an Int32 variable. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1.
Output
Output PathSpecifies the path where the encrypted file will be saved. It supports a string variable, allowing you to define the destination path dynamically.

How to use:

  1. Drag and drop the "Encrypt File" activity onto the workflow.
  2. Configure the properties by specifying the encryption algorithm, key, file path, and output path.
  3. Optionally, configure the delay.
  4. Execute the workflow to encrypt the specified file using the chosen algorithm and key.

Example: Consider an example where the "Encrypt File" activity is used to encrypt a file named "document.txt" using the AES algorithm:

Encrypt File:
Algorithm: AES
Key: "MySecretKey123"
File Path: "C:\Files\document.txt"
Output Path: "C:\EncryptedFiles\document_encrypted.txt"
Result: isEncryptionSuccessful

In this example, the activity encrypts the "document.txt" file using the specified AES algorithm and key. The result of the operation (success or failure) is stored in the Boolean variable "isEncryptionSuccessful" for further handling in the workflow.